package org.itboys.store.search;

import org.apache.solr.client.solrj.SolrQuery;

/**
 * 商品搜索参数
 */
public class ProductSearchParam {

    private static final int DEFAULT_SIZE = 20;
    private static final String DEFAULT_SORT_FIELD = "readCount";

    /**
     * 商品名称关键字
     */
    private String keyword;

    private String brandId;

    private String catId;

    private int type;

//    private int status;

    private int pageSize = DEFAULT_SIZE; //分页条数

    /**
     * 从第一页开始
     */
    private int pageNo = 1;//分页大小

    //TODO 其他的搜索排序条件等产品文档出来再搞
    private String sortField = DEFAULT_SORT_FIELD;
    private SolrQuery.ORDER sortOrder = SolrQuery.ORDER.desc;

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public String getBrandId() {
        return brandId;
    }

    public void setBrandId(String brandId) {
        this.brandId = brandId;
    }

/*    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }*/

    public String getCatId() {
        return catId;
    }

    public void setCatId(String catId) {
        this.catId = catId;
    }

    public String getSortField() {
        return sortField;
    }

    public void setSortField(String sortField) {
        this.sortField = sortField;
    }

    public SolrQuery.ORDER getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(SolrQuery.ORDER sortOrder) {
        this.sortOrder = sortOrder;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
